package com.fsh.anime.model.pojos;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("party_ticket")
public class Ticket {
    /**
     * 门票id，雪花算法
     */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 漫展 ID
     */
    private Integer partyId;

    /**
     * 用户 ID
     */
    private Integer userId;

    /**
     * 票价
     */
    private Integer price;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @TableField(fill = FieldFill.INSERT)//插入的时候自动填充
    private LocalDateTime createTime;
}
